Integrand size = 23, antiderivative size = 80 \[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}} \]
EllipticE(sin(f*x+e),(a/(a+b))^(1/2))*(cos(f*x+e)^2)^(1/2)*(sec(f*x+e)^2*( a+b-a*sin(f*x+e)^2))^(1/2)/f/(1-a*sin(f*x+e)^2/(a+b))^(1/2)
Time = 0.64 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.86 \[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {2} \cos (e+f x) E\left (e+f x\left |\frac {a}{a+b}\right .\right ) \sqrt {a+b \sec ^2(e+f x)}}{f \sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{a+b}}} \]
(Sqrt[2]*Cos[e + f*x]*EllipticE[e + f*x, a/(a + b)]*Sqrt[a + b*Sec[e + f*x ]^2])/(f*Sqrt[(a + 2*b + a*Cos[2*(e + f*x)])/(a + b)])
Time = 0.31 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.12, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4636, 2057, 2058, 330, 327}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+b \sec (e+f x)^2}}{\sec (e+f x)}dx\) |
\(\Big \downarrow \) 4636 |
\(\displaystyle \frac {\int \sqrt {a+\frac {b}{1-\sin ^2(e+f x)}}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2057 |
\(\displaystyle \frac {\int \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2058 |
\(\displaystyle \frac {\sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}} \int \frac {\sqrt {-a \sin ^2(e+f x)+a+b}}{\sqrt {1-\sin ^2(e+f x)}}d\sin (e+f x)}{f \sqrt {-a \sin ^2(e+f x)+a+b}}\) |
\(\Big \downarrow \) 330 |
\(\displaystyle \frac {\sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}} \int \frac {\sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{\sqrt {1-\sin ^2(e+f x)}}d\sin (e+f x)}{f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}\) |
\(\Big \downarrow \) 327 |
\(\displaystyle \frac {\sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right )}{f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}\) |
(EllipticE[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[1 - Sin[e + f*x]^2]*Sqrt[ (a + b - a*Sin[e + f*x]^2)/(1 - Sin[e + f*x]^2)])/(f*Sqrt[1 - (a*Sin[e + f *x]^2)/(a + b)])
3.3.31.3.1 Defintions of rubi rules used
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ (Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) )], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ Sqrt[a + b*x^2]/Sqrt[1 + (b/a)*x^2] Int[Sqrt[1 + (b/a)*x^2]/Sqrt[c + d*x^ 2], x], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && !GtQ[a, 0]
Int[(u_.)*((a_) + (b_.)/((c_) + (d_.)*(x_)^(n_)))^(p_), x_Symbol] :> Int[u* ((b + a*c + a*d*x^n)/(c + d*x^n))^p, x] /; FreeQ[{a, b, c, d, n, p}, x]
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))^(q_.)*((c_) + (d_.)*(x_)^(n_))^ (r_.))^(p_), x_Symbol] :> Simp[Simp[(e*(a + b*x^n)^q*(c + d*x^n)^r)^p/((a + b*x^n)^(p*q)*(c + d*x^n)^(p*r))] Int[u*(a + b*x^n)^(p*q)*(c + d*x^n)^(p* r), x], x] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x], x , Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && !IntegerQ[p]
Result contains complex when optimal does not.
Time = 3.87 (sec) , antiderivative size = 4727, normalized size of antiderivative = 59.09
-1/f/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/(2*I*a^(1/2)*b^(1/2)-a+b)*((a *(1-cos(f*x+e))^4*csc(f*x+e)^4+b*(1-cos(f*x+e))^4*csc(f*x+e)^4-2*a*(1-cos( f*x+e))^2*csc(f*x+e)^2+2*b*(1-cos(f*x+e))^2*csc(f*x+e)^2+a+b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2*I*a^(1/2)*b^(1/2)+a-b)/( a+b))^(1/2)*a*b*(1-cos(f*x+e))^3*csc(f*x+e)^3-(-(2*I*a^(1/2)*b^(1/2)*(1-co s(f*x+e))^2*csc(f*x+e)^2+a*(1-cos(f*x+e))^2*csc(f*x+e)^2-b*(1-cos(f*x+e...
\[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right ) \,d x } \]
\[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int \sqrt {a + b \sec ^{2}{\left (e + f x \right )}} \cos {\left (e + f x \right )}\, dx \]
\[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right ) \,d x } \]
\[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right ) \,d x } \]
Timed out. \[ \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int \cos \left (e+f\,x\right )\,\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}} \,d x \]